package controller.roomManagement.Implementation;

import view.LoginView;
import controller.roomManagement.Interface.ILoginController;
import model.roomManagement.Implementation.ConnectException;
import model.roomManagement.Implementation.LoginModel;
import model.roomManagement.Interface.ILoginModel;


public class LoginController implements ILoginController {
	ILoginModel loginModel;
	LoginView loginView;
	
	public LoginController(ILoginModel loginModel){
		this.loginModel=loginModel;
	//	loginView=new LoginView(this,loginModel);
	//	loginView.creatView();
		
	}

	public int login(int id, String password) throws ConnectException {
		
		return loginModel.login(id, password);
	}

	public void setServerIp(String ip){
		LoginModel.setServerIp(ip);
	}
	public String getServerIp(){
		return LoginModel.getServerIp();
	}
	
	public void quit() {
		loginModel.quit();
		
	}


}
